<?php
namespace app\logic\yuql;

use app\api\controller\yuql\Articlecontent;
use app\api\model\yuql\Article;
use app\api\model\yuql\Article_content;
use app\Request;

class Article_contentLogic{

    public static function index(){

        $data=\app\api\model\yuql\Article_content::paginate(5);
        return $data;

    }

    public static function create($array){

        $res = \app\api\model\yuql\Article_content::create($array);
        return $res;
    }

    public static function update($params){
//        dd($params);
        $res = \app\api\model\yuql\Article_content::update($params);
        return $res;

    }

    public static function delete($id){

        $res = \app\api\model\yuql\Article_content::destroy($id);
        return $res;

    }

    public static function detail($id){

        $res = Article_content::find($id);
        return $res;
    }
}